import request from '@/utils/request'

// 查询库区管理列表
export function listWarehouseZone(query) {
  return request({
    url: '/storage/warehouseZone/list',
    method: 'get',
    params: query
  })
}

// 查询库区管理详细
export function getWarehouseZone(areaId) {
  return request({
    url: '/storage/warehouseZone/' + areaId,
    method: 'get'
  })
}

// 新增库区管理
export function addWarehouseZone(data) {
  return request({
    url: '/storage/warehouseZone',
    method: 'post',
    data: data
  })
}

// 修改库区管理
export function updateWarehouseZone(data) {
  return request({
    url: '/storage/warehouseZone',
    method: 'put',
    data: data
  })
}

// 删除库区管理
export function delWarehouseZone(areaId) {
  return request({
    url: '/storage/warehouseZone/' + areaId,
    method: 'delete'
  })
}

export function addLocation(areaId,quantity){
  return request({
    url: '/storage/warehouseLocation'+'/'+areaId+'/'+quantity,
    method: 'post'
  })
}
